package cn.acup.boot;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.bind.annotation.RequestMapping;

import tk.mybatis.spring.annotation.MapperScan;

/**
 * @author Alan.z 
 */
@SpringBootApplication
@EnableScheduling
@Configuration
@MapperScan(basePackages = "cn.acup.boot..*.dao")
public class Application implements CommandLineRunner {
    private Logger logger = LoggerFactory.getLogger(Application.class);

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        logger.warn("服务启动完成!");
    }

    @RequestMapping("/")
    String home() {
        return "redirect:cities";
    }
    
}
